1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method for automatically discriminating whether a document is a color document or a black-and-white document, an image forming apparatus and a facsimile machine including the image processing apparatus, and a computer readable recording medium storing an image processing program.
2. Description of the Related Art
Some of color complex machines and color scanners have an automatic color document discrimination function of automatically discriminating whether a document is a color document or a black-and-white document based on image data obtained by scanning the document with an image reader. For example, in a certain color document discrimination technology, a mechanism is provided which discriminates whether each pixel (or area) is chromatic color or achromatic color based on a predetermined threshold value from a plurality of color component signals of each pixel, and determines that the document is a color document if a ratio of chromatic pixels (or areas) to the total pixels (or total area) is larger than a predetermined threshold value. In other words, the document is determined to be a color document if the chromatic pixels (or areas) account for a predetermined area or larger on the document while being determined to be a black-and-white document unless otherwise. By controlling color/black-and-white copying (scanning) according to this determination result, a user needs not instruct color/black-and-white copying (scanning) for each document, whereby convenience is improved.
With the increase in the use of color complex machines in offices and the like in recent years, there is a growing need to set a plurality of documents at one time and automatically copy/scan, and automatic document feeders (ADFs) are frequently used. Conveyor rollers for conveying documents, a motor for driving the conveyor rollers, etc. are provided in this automatic document feeder.
In the case of reading documents using the automatic document feeder, color drift may occur in a document conveying direction due to a conveying speed ripple, a slight vibration, and the like, the conveying speed ripple being caused by a rotational speed ripple of the motor, slippage between the documents and the conveyor rollers, and the like, the slight vibration being produced when the documents are nipped by the conveyor rollers or separated from the conveyor rollers, etc. There have been cases where the presence of chromatic pixels is determined in an edge part of a black character or the like and accuracy of color document discrimination is adversely affected due to this color drift.
Various color document discrimination technologies have been conventionally known as those for suppressing the influence of such color drift on color document discrimination. In a certain color document discrimination technology, an achromatic area is detected from an input image and it is prevented that color drift in an edge part of the achromatic area is determined to be color by extending this achromatic area. In another color document discrimination technology, an influence by color drift is suppressed by making a color document discrimination function inoperative for a predetermined area of an input image where color drift is assumed to occur. In still another color document discrimination technology, an influence by color drift is suppressed by switching a color document discrimination parameter to a parameter with an increased level of discrimination criterion to make color document discrimination difficult for a predetermined area of an input image.